<clr-datagrid [clrDgLoading]="loading">
    <clr-dg-column>{{'APP_MSG_TYPE'|translate}}</clr-dg-column>
    <clr-dg-column>{{'APP_MSG_LOCAL_MAIL'|translate}}</clr-dg-column>
    <clr-dg-column>{{'APP_MSG_EMAIL'|translate}}</clr-dg-column>
    <clr-dg-column>{{'APP_MSG_WORK_WEIXIN'|translate}}</clr-dg-column>
    <clr-dg-column>{{'APP_MSG_DING_TALK'|translate}}</clr-dg-column>
    <clr-dg-row class="fixed-height" *ngFor="let item of items" [clrDgItem]="item">
        <clr-dg-cell>{{item.type | messageType}}</clr-dg-cell>
        <clr-dg-cell>
            <input clrToggle type="checkbox" name="supper" [checked]="item.vars['LOCAL'] === 'ENABLE'" (change)="updateConfig(item,'LOCAL')"/>
        </clr-dg-cell>
        <clr-dg-cell>
            <input clrToggle type="checkbox" name="supper" [checked]="item.vars['EMAIL'] === 'ENABLE'" (change)="updateConfig(item,'EMAIL')"/>
        </clr-dg-cell>
        <clr-dg-cell>
            <input clrToggle type="checkbox" name="supper" [checked]="item.vars['WORK_WEIXIN'] === 'ENABLE'" (change)="updateConfig(item,'WORK_WEIXIN')"/>
        </clr-dg-cell>
        <clr-dg-cell>
            <input clrToggle type="checkbox" name="supper" [checked]="item.vars['DING_TALK'] === 'ENABLE'" (change)="updateConfig(item,'DING_TALK')"/>
        </clr-dg-cell>
    </clr-dg-row>
</clr-datagrid>